-
Notifications
You must be signed in to change notification settings - Fork 37
Fix transaction re-signing #554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes transaction re-signing by properly tracking transaction state changes during the signing process. The change ensures that when a transaction's version or options are modified during the signing process (e.g., for hash signing), these alterations are correctly detected to trigger re-signing.
Key changes:
- Added deep copy tracking of the initial transaction state before modifications
- Enhanced alteration detection to compare initial vs modified transaction properties
- Version bump to 11.2.1
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pyproject.toml | Version bump to 11.2.1 for the bug fix release |
| multiversx_sdk_cli/cli_shared.py | Added transaction state tracking and improved alteration detection logic |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if initial_tx.version != transaction.version: | ||
| altered = True | ||
|
|
||
| if initial_tx.options != transaction.options: | ||
| altered = True |
Copilot
AI
Oct 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic checks for changes between initial_tx and transaction before any explicit alterations are made. This creates a redundant check since at this point in the function, transaction should be identical to initial_tx. Consider moving these checks after the explicit alteration logic (lines 904-910) to properly detect all changes.
andreibancioiu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing CLI test.
|
|
||
| altered = _alter_version_and_options_if_provided( | ||
| args=args, | ||
| initial_tx=initial_tx, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming inconsistency, tx vs. transaction.
|
|
||
| def _alter_version_and_options_if_provided( | ||
| args: Any, | ||
| initial_tx: Transaction, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming inconsistency.
No description provided.